package com.borqsprocessmanager.receiver;

import com.borqsprocessmanager.BatteryManagerService;
import com.borqsprocessmanager.util.Log;

import android.content.Context;
import android.content.Intent;

public class RestartReceiver extends BaseBroadcastReceiver {

    private final String TAG = "RestartReceiver";

    @Override
    public void onReceive(Context context, Intent intent) {
        Log.v(TAG, "onReceive");
        if (intent.getAction() == Intent.ACTION_BOOT_COMPLETED) {
            Intent serviceIntent = new Intent(context,
                    BatteryManagerService.class);
            context.startService(serviceIntent);
            Log.v(TAG, "startService");
        }
    }
}
